Skip to content

Add native JSON type support for SQL Server 2025#28101

Open
kirkhansen wants to merge 1 commit intotrinodb:masterfrom
kirkhansen:mssql-json-fix
Open

Add native JSON type support for SQL Server 2025#28101
kirkhansen wants to merge 1 commit intotrinodb:masterfrom
kirkhansen:mssql-json-fix

Conversation

@kirkhansen
Copy link
Copy Markdown
Contributor

@kirkhansen kirkhansen commented Feb 3, 2026

Description

This PR adds support for SQL Server 2025's native JSON data type in the Trino SQL Server connector. Previously, JSON columns were filtered out due to the Microsoft JDBC driver not exposing them through DatabaseMetaData.getColumns().

Changes:

  • Add JsonType mapping in SqlServerClient for SQL Server's native JSON type (DATA_TYPE: -157/-159)
  • Add comprehensive JSON tests to base type mapping tests
  • Update pom.xml to use Microsoft JDBC Driver 13.3.1 (includes PR Add support for json_path wildcard #2883 fix for JSON column visibility)

Testing: All tests pass against SQL Server 2025-latest container (RTM-CU1)

Additional context and related issues

Release notes

(x) Release notes are required, with the following suggested text:

## JDBC connectors
* Add support for SQL Server 2025 native JSON data type. (#28082)

Related PRs

@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Feb 3, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Kirk Hansen.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@github-actions github-actions bot added the sqlserver SQLServer connector label Feb 3, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot bot commented Feb 3, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Kirk Hansen.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot cla-bot bot added the cla-signed label Feb 3, 2026
@ebyhr ebyhr added the needs-docs This pull request requires changes to the documentation label Feb 3, 2026
@github-actions
Copy link
Copy Markdown

This pull request has gone a while without any activity. Ask for help on #core-dev on Trino slack.

@github-actions github-actions bot added the stale label Feb 25, 2026
@github-actions
Copy link
Copy Markdown

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions bot closed this Mar 18, 2026
@kirkhansen kirkhansen reopened this Mar 19, 2026
@kirkhansen kirkhansen force-pushed the mssql-json-fix branch 3 times, most recently from 814f905 to 901a6c1 Compare March 19, 2026 01:40
@kirkhansen kirkhansen marked this pull request as ready for review March 19, 2026 01:59
@github-actions github-actions bot removed the stale label Mar 19, 2026
@kirkhansen
Copy link
Copy Markdown
Contributor Author

@findepi Let me know if that's what you were after or not. Happy to make any fixes or adjustments as needed here.

@findepi findepi requested a review from findinpath April 1, 2026 15:03
@findinpath
Copy link
Copy Markdown
Contributor

@kirkhansen please rebase on trino/master. 🙏
There have been some enhancements since you initially done the submission.

@findinpath
Copy link
Copy Markdown
Contributor

@kirkhansen please also squash all the commits because they all relate to each other.

@kirkhansen kirkhansen force-pushed the mssql-json-fix branch 3 times, most recently from 22ba0c6 to a0bdea4 Compare April 15, 2026 02:37
@findinpath
Copy link
Copy Markdown
Contributor

@kirkhansen pls do push an empty commit to retrigger the build 🙏 - error-prone-checks mistakely failed.

git commit --allow-empty  -m "empty"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed needs-docs This pull request requires changes to the documentation sqlserver SQLServer connector

Development

Successfully merging this pull request may close these issues.

Add native JSON type support to SQL Server connector

4 participants